home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 028a / arcpy171.zip / ARCOPY.DOC < prev   
Text File  |  1991-10-03  |  14KB  |  260 lines

  1.  
  2.                                   ARCOPY.DOC
  3.                                   ----------
  4.                          Instructions for ARCOPY.COM
  5.                           Version 1.71 (2 Oct 1991)
  6.  
  7.                              (c)1988-91 E. Meyer
  8.  
  9.  
  10.      ARCOPY (ARchive COPY) is a small, fast disk file copy utility for all 
  11. MSDOS (2.x and above) systems.  Its features are geared toward the tasks of 
  12. backing up (archiving) files, and maintaining multiple copies of files; but it 
  13. can also make ordinary file copying, moving, and renaming easier.
  14.      ARCOPY is geared toward command line aficionados who want to be able to 
  15. do as much as possible at one DOS prompt.  It can copy different groups of 
  16. files at once; copy all except certain files; backup files by time stamp or 
  17. archive flag; select files to copy by existence on destination directory, or 
  18. by prompting the user individually; move files easily from one directory to 
  19. another; do ambiguous copying and renaming safely; and more.
  20.  
  21.      The syntax and options of ARCOPY are compatible with my DTA (directory/ 
  22. tree/attribute), DIRCMP (directory compare), and DLT (delete) utilities, which 
  23. work well together.
  24.  
  25.  
  26.                                  USING ARCOPY
  27.                                  ------------
  28.  
  29. SYNTAX:   A>ARCOPY source{,source2,...} {dest} {/options}      "{}"=optional
  30.  
  31.          Like DOS COPY, ARCOPY expects two arguments: a source and a 
  32.       destination filespec.  However, the source may be a list of 
  33.       files as well, delimited with commas (unless option /X used).  
  34.       If the destination is omitted, the current directory is 
  35.       assumed.  Any options may be specified after a slash "/".
  36.          Either filespec may be ambiguous; destination filename 
  37.       defaults to same as source.  Subdirectories are supported.  
  38.       Common device names (CON,PRN...) are also accepted.
  39.  
  40.      If NO arguments are given, ARCOPY loads into memory and gives a dash 
  41. prompt (just like the CP/M utility PIP, if anybody remembers that).  You can 
  42. perform multiple copying operations, entering a set of arguments (source,dest) 
  43. at each prompt, and can remove the disk containing ARCOPY if needed on systems 
  44. without a hard disk.  To exit, just press RETURN or ^C.
  45.  
  46.      If the source is a comma-delimited list, the previous filespec's drive 
  47. and directory carry over to the next one, unless the latter itself begins with 
  48. a drive or root directory.
  49.  
  50.      ARCOPY lists files in each source filespec alphabetically as it processes 
  51. them; you may abort at any time by typing ^C.  If the destination names are 
  52. different, both names are shown: OLDFILE.NAM -> NEWFILE.NAM.
  53.  
  54.  
  55. OPTIONS:      "Options" must be preceded by one slash "/"; separating 
  56.          spaces, and further slashes, are optional.  Several (/A,M,P) 
  57.          are identical to DOS XCOPY utility options.
  58.  
  59. /? -  display help message
  60.  
  61. /A -  only files with the ARCHIVE attribute will be copied.  (See "Incremental 
  62.     Backup" below for further explanation.)
  63. /B -  only files with timestamp BEFORE specified date/time (see formats below) 
  64.     will be copied.  (Defaults are today, 0 hours.)
  65. /E -  only files previously EXISTING on the destination directory will be 
  66.     copied.  (Normally used together with /T,A,M for incremental backup.)
  67. /H -  HIDDEN and System files, normally ignored, will be found and copied 
  68.     along with normal files.
  69. /L -  only files with timestamp LATER than specified date/time (see formats 
  70.     below) will be copied.  (Defaults are today, 0 hours.)
  71. /M - only files with the Archive attribute are copied, and then MARKED by 
  72.     having their Archive attribute removed.  (See "Incremental Backup" below.)
  73. /N -  only files previously NOT existing on the destination directory will be 
  74.     copied.
  75. /P -  you will be PROMPTED "y/n?" for each file about to be processed.  Press 
  76.     "Y" to copy the file, or "N" to skip it.
  77. /R -  files will be RENAMED or moved: renamed, if the directory is the same; 
  78.     moved, if the destination directory is different.
  79. /T -  existing files on the destination directory will only be overwritten if 
  80.     the source copy has a more recent TIMESTAMP.
  81. /W -  copying may WRITE over or delete Read/Only files.  (Normally, any 
  82.     attempt to do this will cause a DOS R/O error.)
  83. /X -  all files (*.*) EXCEPT those specified will be copied.  (This option 
  84.     requires a single source, not a comma-delimited list.)
  85. /Z -  the high (parity) bit will be ZEROED in the output file, which converts 
  86.     nonstandard data (like WordStar text) into readable ASCII form.
  87.  
  88.  
  89.                          INCREMENTAL BACKUP: /A,E,M,T
  90.  
  91.      It's important to maintain backup copies of important data, but this can 
  92. be a tedious task.  Fortunately you don't need to remember exactly which files 
  93. have been modified recently; there are two automatic ways to update disks by 
  94. selecting and copying just those files that need it ("incremental backup").
  95.  
  96. (1) THE ARCHIVE ATTRIBUTE
  97.      MSDOS maintains a file attribute called Archive.  Whenever a disk file is 
  98. modified, this attribute is set.  Consequently, if this attribute was cleared 
  99. in the past (the last time you did a backup), the files which now have it set 
  100. are those you have created or changed since, and need to back up now.
  101.      ARCOPY can copy just those modified files, and (if you want) clear their 
  102. attribute again to indicate they have been archived.  So all you have to type 
  103. each time you want to back up the contents of a directory to disk B: is:
  104.                              ARCOPY *.* B: /M
  105. In conjunction with this, when you are first setting up your disks, you may 
  106. find a use for a utility that can manually set or clear the Archive attribute 
  107. on groups of files, such as my DTA.COM.
  108.      The /A option works the same way, but does not reset the Archive 
  109. attribute on files after copying.  The /E option can be added to either one, 
  110. in order to archive only a certain group of files (see below).
  111.      (DOS 3.x users should look up the ATTRIB and XCOPY utilities in their 
  112. manual for an alternative approach to the task.)
  113.  
  114. (2) THE TIMESTAMP
  115.      If your computer has a clock, the MSDOS file timestamp can also be used 
  116. to determine whether one copy of a file has been modified more recently than 
  117. another.  Thus, you can also back up files to disk B: by typing:
  118.                              ARCOPY *.* B: /T
  119. Files that already exist on B: will only be copied if the source copy is more 
  120. recent.  In addition, all files that don't already exist on the destination 
  121. directory will be copied, so B: will become a full backup for the current 
  122. directory.  If you want to avoid this, add the /E option:
  123.                              ARCOPY *.* B: /E/T
  124. This time only files already existing on B: are updated.  This allows B: to be 
  125. the backup for only a certain group of files in the current directory (which 
  126. can therefore be backed up on multiple disks).
  127.      This method of backup is the simplest; I now use it all the time.
  128.      (DOS 3.x XCOPY has an option to copy all files changed since a given 
  129. date, but ARCOPY's comparison is easier to use for backup purposes.)
  130.  
  131.  
  132.                          COPYING BY TIME STAMPS: /B,L
  133.  
  134.      With the /B and /L options, you can choose to copy only files dated 
  135. before or later than a given date or time.  (You can even use both together, 
  136. to specify an interval of time.)
  137.      In either case, the date and/or time should follow the option letter; if 
  138. both are specified, separate them with a comma.  If the time is omitted, it 
  139. defaults to 0 hours (12 AM); if the date is omitted, it defaults to TODAY.  
  140. ARCOPY recognizes U.S., European, and Numeric formats for entering each, by 
  141. the punctuation used:
  142.        U.S.(M/D/Y,H:MMa-p)    Euro (D.M.Y,H:MM)     Num (Y-M-D,HHMM)
  143.           3/25/90,1:45p    =    25.3.90,13:45    =    90-3-25,1345
  144. (If you add the /A or /P option after a Euro format time, insert a slash or 
  145. space so it doesn't look like a U.S. format time.)  Examples:
  146.               /L                  today (later than today, 0:00)
  147.               /B12:45a            before 12:45 AM today
  148.               /L25.3.90,13:00     later than March 25 1990, 1 PM
  149.               /L89-12-1 /B90-1-1  any time in December 1989
  150.  
  151.  
  152.                         MOVING AND RENAMING FILES: /R
  153.  
  154.      The /R option has powerful moving and renaming features, depending on the 
  155. circumstances of its use.  If the destination is another drive, files are 
  156. copied and then the originals are deleted.  If it is another directory on the 
  157. same drive, files are quickly re-assigned to the new directory.  If it is the 
  158. same directory, files are simply renamed.  Examples:
  159.               B: A: /R            move all files from drive B: to A:
  160.               *.DOC \NEW /R       move files *.DOC from current dir to \NEW
  161.               *.DOC,*.TXT * /R    remove filetype from all files *.DOC,*.TXT
  162.  
  163.  
  164.                            MISCELLANY: /H,N,P,W,X,Z
  165.  
  166.      The /H,/P,/W,/Z options are all quite straightforward.  /N can be useful 
  167. for reconciling two directories in a simple situation where different versions 
  168. of the same file aren't an issue; it copies only files that aren't already in 
  169. the destination directory.  /X will copy everything except certain file(s) -- 
  170. note that it cannot be used with a comma-delimited list.  Examples:
  171.               *.COM,*.EXE B: /N   copy all COM/EXE files not already on B:
  172.               TEMP.NOT A: /X      copy all files except TEMP.NOT to A:
  173.  
  174.  
  175.                           SAFE COPYING AND RENAMING
  176.  
  177.      Renaming groups of files (or copying them to new names) can create 
  178. unexpected problems.  If the wildcards match exactly (as in *.DOC to *.BAK) 
  179. it's straightforward enough.  But (unlike COPY or XCOPY) ARCOPY also lets you 
  180. do more complex renaming safely, when it's difficult to forsee results which 
  181. depend on the specific filenames encountered.  Suppose you want to create 
  182. backup copies on drive B: of some text files on drive A:.  You might type:
  183.                             A>ARCOPY *.* B:*.BAK
  184. Now, if the files on drive A: were KLAATU.DOC, GORT.DOC, and NIKTO, this would 
  185. work just fine, and ARCOPY would create copies (B:KLAATU.BAK etc) as intended.
  186.      But suppose there had been a fourth file A:GORT.TXT.  Both it and 
  187. GORT.DOC would have to be copied to the same destination B:GORT.BAK, causing 
  188. one file to overwrite the other, which is likely to be a bad idea.  (X)COPY 
  189. would go ahead and do this; and you'd think you had copies of all four files, 
  190. when you only had three.  ARCOPY is more intelligent: before processing each 
  191. group of files (here *.*), it checks to make sure their output names are all 
  192. different from one another (and from those of any previous groups), and if not 
  193. it will give a warning ("Conflict") and skip the group.
  194.      Similarly, ARCOPY will warn of situations where a file would be copied 
  195. onto itself and destroyed ("Overwrite") or an illegal filename would be 
  196. created ("Illegal"), and skip the offending group; (X)COPY would allow the 
  197. error to occur, then announce it and quit.
  198.  
  199.  
  200.                                 ABOUT DEVICES
  201.  
  202.      MSDOS provides a number of "device names" which may be used in place of a 
  203. filename, as either source or destination.  ARCOPY fully supports these: AUX, 
  204. COM1-2, CON, LPT1-2, LST, PRN, NUL.  The most useful are:
  205.               CON - the console (keyboard input, screen output)
  206.               PRN - printer output
  207. Console input is terminated with ^Z, RETURN.  (Certain disk file specific 
  208. options are not allowed with device I/O.  Note also that ARCOPY reads disk 
  209. files as binary data, and does NOT treat ^Z as an end of file marker.)  
  210. Example:      PAPER.DOC CON /Z    types word processor file onscreen in ASCII
  211.  
  212.  
  213.  
  214.                                 ERROR MESSAGES
  215.  
  216.     <Bad argument>  Missing or invalid file specification
  217.       <Bad option>  Illegal or disallowed option
  218.    <Bad directory>  Nonexistent drive/directory
  219.        <Overwrite>  Destination would have been the same as source
  220.         <Conflict>  Two sources would have copied to the same destination
  221.          <Illegal>  A file with an illegal name would have been constructed
  222.         <Overflow>  Too many files (over 1000; try copying fewer at once)
  223.       <Read error>  DOS error opening or reading source file
  224.      <Write error>  DOS error on output: full disk, read/only file, etc
  225.        <No memory>  Not enough memory available
  226.          <Aborted>  User pressed ^C to abort operation
  227.  
  228.      If an error occurs, ARCOPY sets the DOS error code, so that batch files 
  229. can test the ERRORLEVEL to determine subsequent action.  Normally 0, the value 
  230. returned will be the sum of whichever of the following errors occurred:
  231.      1 = bad argument/option/directory   16 = disk error (read/write)
  232.      2 = out of memory                  128 = user abort
  233.      4 = files skipped (overwrite/conflict/illegal/overflow)
  234.  
  235.  
  236.                                    HISTORY
  237.  
  238. ARCOPY 1.0  (Mar88) - First release, based on my previous CP/M utility ARCOPY.
  239.        1.01 (Apr88) - Fixed parsing of options with no second filename.
  240.        1.02 (May88) - Preserves original file time/date.
  241.        1.1  (Jul88) - New options /T, /?.  Improved parsing.
  242.        1.2  (Apr89) - Comma-delimited multiple source lists.
  243.        1.3  (Oct89) - Improved efficiency of copying and moving files.
  244.        1.4  (Dec89) - New options /B, /L.  Improved parsing.
  245.        1.5  (May90) - Small fixes; simplified multiple-source syntax.
  246.        1.6  (Apr91) - New option /X.  Small fixes.
  247.        1.7  (May91) - US/Euro/Numeric time,date formats.  Small fixes.
  248.        1.71 (Oct91) - Improved conflict detection; sets DOS ERRORLEVEL.
  249.  
  250.      ARCOPY and its documentation are (c)1988-91 E.Meyer, all rights reserved.  
  251. They may be freely distributed, but not modified or sold for profit without my 
  252. written consent.  (Libraries may charge no more than $6 for a disk.)  The user 
  253. takes full responsibility for any damages resulting from the use of this 
  254. program.
  255.  
  256.                  Eric Meyer
  257.               3541 Smuggler Way              CompuServe [74415,1305]
  258.            Boulder, CO  80303  USA
  259.  
  260.